import request from '@/utils/request'
export const company = (id) => {
  return request({
    url: `/company/${id}`
  })
}
export const roleList = (params) => {
  return request({
    url: `/sys/role`,
    params
  })
}
export const getroleList = () => {
  return request({
    url: `/sys/role`
  })
}
export const delRows = (id) => {
  return request({
    method: 'DELETE',
    url: `/sys/role/${id}`
  })
}
export const getstaff = (id) => {
  return request({
    url: `/sys/role/${id}`
  })
}
export const editRole = (id, data) => {
  return request({
    method: 'PUT',
    url: `/sys/role/${id}`,
    data
  })
}
export const addRows = (data) => {
  return request({
    method: 'POST',
    url: `/sys/role`,
    data
  })
}
export const setRoot = (data) => {
  return request({
    method: 'PUT',
    url: `/sys/role/assignPrem`,
    data
  })
}
